Optimal. Leaf size=190 \[ -\frac {B (b c-a d) n}{2 (b f-a g) (d f-c g) (f+g x)}+\frac {b^2 B n \log (a+b x)}{2 g (b f-a g)^2}-\frac {A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )}{2 g (f+g x)^2}-\frac {B d^2 n \log (c+d x)}{2 g (d f-c g)^2}+\frac {B (b c-a d) (2 b d f-b c g-a d g) n \log (f+g x)}{2 (b f-a g)^2 (d f-c g)^2} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.15, antiderivative size = 190, normalized size of antiderivative = 1.00, number of steps
used = 3, number of rules used = 2, integrand size = 30, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.067, Rules used = {2547, 84}
\begin {gather*} -\frac {B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )+A}{2 g (f+g x)^2}+\frac {b^2 B n \log (a+b x)}{2 g (b f-a g)^2}-\frac {B n (b c-a d)}{2 (f+g x) (b f-a g) (d f-c g)}+\frac {B n (b c-a d) \log (f+g x) (-a d g-b c g+2 b d f)}{2 (b f-a g)^2 (d f-c g)^2}-\frac {B d^2 n \log (c+d x)}{2 g (d f-c g)^2} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 84
Rule 2547
Rubi steps
\begin {align*} \int \frac {A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )}{(f+g x)^3} \, dx &=-\frac {A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )}{2 g (f+g x)^2}+\frac {(B n) \int \frac {b c-a d}{(a+b x) (c+d x) (f+g x)^2} \, dx}{2 g}\\ &=-\frac {A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )}{2 g (f+g x)^2}+\frac {(B (b c-a d) n) \int \frac {1}{(a+b x) (c+d x) (f+g x)^2} \, dx}{2 g}\\ &=-\frac {A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )}{2 g (f+g x)^2}+\frac {(B (b c-a d) n) \int \left (\frac {b^3}{(b c-a d) (b f-a g)^2 (a+b x)}-\frac {d^3}{(b c-a d) (-d f+c g)^2 (c+d x)}+\frac {g^2}{(b f-a g) (d f-c g) (f+g x)^2}-\frac {g^2 (-2 b d f+b c g+a d g)}{(b f-a g)^2 (d f-c g)^2 (f+g x)}\right ) \, dx}{2 g}\\ &=-\frac {B (b c-a d) n}{2 (b f-a g) (d f-c g) (f+g x)}+\frac {b^2 B n \log (a+b x)}{2 g (b f-a g)^2}-\frac {A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )}{2 g (f+g x)^2}-\frac {B d^2 n \log (c+d x)}{2 g (d f-c g)^2}+\frac {B (b c-a d) (2 b d f-b c g-a d g) n \log (f+g x)}{2 (b f-a g)^2 (d f-c g)^2}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.37, size = 173, normalized size = 0.91 \begin {gather*} \frac {-\frac {A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )}{(f+g x)^2}+B (b c-a d) n \left (\frac {b^2 \log (a+b x)}{(b c-a d) (b f-a g)^2}+\frac {\frac {g (-d f+c g)}{(b f-a g) (f+g x)}+\frac {d^2 \log (c+d x)}{-b c+a d}-\frac {g (-2 b d f+b c g+a d g) \log (f+g x)}{(b f-a g)^2}}{(d f-c g)^2}\right )}{2 g} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [F]
time = 0.05, size = 0, normalized size = 0.00 \[\int \frac {A +B \ln \left (e \left (\frac {b x +a}{d x +c}\right )^{n}\right )}{\left (g x +f \right )^{3}}\, dx\]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.31, size = 356, normalized size = 1.87 \begin {gather*} \frac {1}{2} \, {\left (\frac {b^{2} \log \left (b x + a\right )}{b^{2} f^{2} g - 2 \, a b f g^{2} + a^{2} g^{3}} - \frac {d^{2} \log \left (d x + c\right )}{d^{2} f^{2} g - 2 \, c d f g^{2} + c^{2} g^{3}} + \frac {{\left (2 \, {\left (b^{2} c d - a b d^{2}\right )} f - {\left (b^{2} c^{2} - a^{2} d^{2}\right )} g\right )} \log \left (g x + f\right )}{b^{2} d^{2} f^{4} + a^{2} c^{2} g^{4} - 2 \, {\left (b^{2} c d + a b d^{2}\right )} f^{3} g + {\left (b^{2} c^{2} + 4 \, a b c d + a^{2} d^{2}\right )} f^{2} g^{2} - 2 \, {\left (a b c^{2} + a^{2} c d\right )} f g^{3}} - \frac {b c - a d}{b d f^{3} + a c f g^{2} - {\left (b c + a d\right )} f^{2} g + {\left (b d f^{2} g + a c g^{3} - {\left (b c + a d\right )} f g^{2}\right )} x}\right )} B n - \frac {B \log \left ({\left (\frac {b x}{d x + c} + \frac {a}{d x + c}\right )}^{n} e\right )}{2 \, {\left (g^{3} x^{2} + 2 \, f g^{2} x + f^{2} g\right )}} - \frac {A}{2 \, {\left (g^{3} x^{2} + 2 \, f g^{2} x + f^{2} g\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 1094 vs.
\(2 (181) = 362\).
time = 47.84, size = 1094, normalized size = 5.76 \begin {gather*} -\frac {{\left (A + B\right )} b^{2} d^{2} f^{4} + {\left (A + B\right )} a^{2} c^{2} g^{4} - 2 \, {\left ({\left (A + B\right )} b^{2} c d + {\left (A + B\right )} a b d^{2}\right )} f^{3} g + {\left ({\left (A + B\right )} b^{2} c^{2} + 4 \, {\left (A + B\right )} a b c d + {\left (A + B\right )} a^{2} d^{2}\right )} f^{2} g^{2} - 2 \, {\left ({\left (A + B\right )} a b c^{2} + {\left (A + B\right )} a^{2} c d\right )} f g^{3} + {\left ({\left (B b^{2} c d - B a b d^{2}\right )} f^{2} g^{2} - {\left (B b^{2} c^{2} - B a^{2} d^{2}\right )} f g^{3} + {\left (B a b c^{2} - B a^{2} c d\right )} g^{4}\right )} n x + {\left (B b^{2} d^{2} f^{4} + B a^{2} c^{2} g^{4} - 2 \, {\left (B b^{2} c d + B a b d^{2}\right )} f^{3} g + {\left (B b^{2} c^{2} + 4 \, B a b c d + B a^{2} d^{2}\right )} f^{2} g^{2} - 2 \, {\left (B a b c^{2} + B a^{2} c d\right )} f g^{3}\right )} n \log \left (\frac {b x + a}{d x + c}\right ) + {\left ({\left (B b^{2} c d - B a b d^{2}\right )} f^{3} g - {\left (B b^{2} c^{2} - B a^{2} d^{2}\right )} f^{2} g^{2} + {\left (B a b c^{2} - B a^{2} c d\right )} f g^{3}\right )} n - {\left ({\left (B b^{2} d^{2} f^{2} g^{2} - 2 \, B b^{2} c d f g^{3} + B b^{2} c^{2} g^{4}\right )} n x^{2} + 2 \, {\left (B b^{2} d^{2} f^{3} g - 2 \, B b^{2} c d f^{2} g^{2} + B b^{2} c^{2} f g^{3}\right )} n x + {\left (B b^{2} d^{2} f^{4} - 2 \, B b^{2} c d f^{3} g + B b^{2} c^{2} f^{2} g^{2}\right )} n\right )} \log \left (b x + a\right ) + {\left ({\left (B b^{2} d^{2} f^{2} g^{2} - 2 \, B a b d^{2} f g^{3} + B a^{2} d^{2} g^{4}\right )} n x^{2} + 2 \, {\left (B b^{2} d^{2} f^{3} g - 2 \, B a b d^{2} f^{2} g^{2} + B a^{2} d^{2} f g^{3}\right )} n x + {\left (B b^{2} d^{2} f^{4} - 2 \, B a b d^{2} f^{3} g + B a^{2} d^{2} f^{2} g^{2}\right )} n\right )} \log \left (d x + c\right ) - {\left ({\left (2 \, {\left (B b^{2} c d - B a b d^{2}\right )} f g^{3} - {\left (B b^{2} c^{2} - B a^{2} d^{2}\right )} g^{4}\right )} n x^{2} + 2 \, {\left (2 \, {\left (B b^{2} c d - B a b d^{2}\right )} f^{2} g^{2} - {\left (B b^{2} c^{2} - B a^{2} d^{2}\right )} f g^{3}\right )} n x + {\left (2 \, {\left (B b^{2} c d - B a b d^{2}\right )} f^{3} g - {\left (B b^{2} c^{2} - B a^{2} d^{2}\right )} f^{2} g^{2}\right )} n\right )} \log \left (g x + f\right )}{2 \, {\left (b^{2} d^{2} f^{6} g + a^{2} c^{2} f^{2} g^{5} - 2 \, {\left (b^{2} c d + a b d^{2}\right )} f^{5} g^{2} + {\left (b^{2} c^{2} + 4 \, a b c d + a^{2} d^{2}\right )} f^{4} g^{3} - 2 \, {\left (a b c^{2} + a^{2} c d\right )} f^{3} g^{4} + {\left (b^{2} d^{2} f^{4} g^{3} + a^{2} c^{2} g^{7} - 2 \, {\left (b^{2} c d + a b d^{2}\right )} f^{3} g^{4} + {\left (b^{2} c^{2} + 4 \, a b c d + a^{2} d^{2}\right )} f^{2} g^{5} - 2 \, {\left (a b c^{2} + a^{2} c d\right )} f g^{6}\right )} x^{2} + 2 \, {\left (b^{2} d^{2} f^{5} g^{2} + a^{2} c^{2} f g^{6} - 2 \, {\left (b^{2} c d + a b d^{2}\right )} f^{4} g^{3} + {\left (b^{2} c^{2} + 4 \, a b c d + a^{2} d^{2}\right )} f^{3} g^{4} - 2 \, {\left (a b c^{2} + a^{2} c d\right )} f^{2} g^{5}\right )} x\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-1)] Timed out
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Timed out} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 2952 vs.
\(2 (181) = 362\).
time = 4.90, size = 2952, normalized size = 15.54 \begin {gather*} \text {Too large to display} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 6.20, size = 430, normalized size = 2.26 \begin {gather*} \frac {\ln \left (f+g\,x\right )\,\left (g\,\left (B\,a^2\,d^2\,n-B\,b^2\,c^2\,n\right )-2\,B\,a\,b\,d^2\,f\,n+2\,B\,b^2\,c\,d\,f\,n\right )}{2\,a^2\,c^2\,g^4-4\,a^2\,c\,d\,f\,g^3+2\,a^2\,d^2\,f^2\,g^2-4\,a\,b\,c^2\,f\,g^3+8\,a\,b\,c\,d\,f^2\,g^2-4\,a\,b\,d^2\,f^3\,g+2\,b^2\,c^2\,f^2\,g^2-4\,b^2\,c\,d\,f^3\,g+2\,b^2\,d^2\,f^4}-\frac {\frac {A\,a\,c\,g^2+A\,b\,d\,f^2-A\,a\,d\,f\,g-A\,b\,c\,f\,g-B\,a\,d\,f\,g\,n+B\,b\,c\,f\,g\,n}{a\,c\,g^2+b\,d\,f^2-a\,d\,f\,g-b\,c\,f\,g}-\frac {x\,\left (B\,a\,d\,g^2\,n-B\,b\,c\,g^2\,n\right )}{a\,c\,g^2+b\,d\,f^2-a\,d\,f\,g-b\,c\,f\,g}}{2\,f^2\,g+4\,f\,g^2\,x+2\,g^3\,x^2}-\frac {B\,\ln \left (e\,{\left (\frac {a+b\,x}{c+d\,x}\right )}^n\right )}{2\,g\,\left (f^2+2\,f\,g\,x+g^2\,x^2\right )}+\frac {B\,b^2\,n\,\ln \left (a+b\,x\right )}{2\,a^2\,g^3-4\,a\,b\,f\,g^2+2\,b^2\,f^2\,g}-\frac {B\,d^2\,n\,\ln \left (c+d\,x\right )}{2\,c^2\,g^3-4\,c\,d\,f\,g^2+2\,d^2\,f^2\,g} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________